package org.dinner.order.service.impl;

import java.util.List;

import org.dinner.order.dao.DishTypeDAO;
import org.dinner.order.model.DishType;
import org.dinner.order.service.DishTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class DishTypeServiceImpl implements DishTypeService {
	
	@Autowired
	private DishTypeDAO dishTypeDAO;
	
	@Transactional
	public DishType add(DishType item) {
		return dishTypeDAO.add(item);
	}

	@Transactional
	public List<DishType> list() {
		return dishTypeDAO.list();
	}

	@Transactional
	public DishType getById(int id) {
		return dishTypeDAO.getById(id);
	}

	@Transactional
	public void remove(int id) {
		dishTypeDAO.remove(id);
	}

}
